exports.urlencoded = () => {
	return (req, res, next) => {
		if (req.method === "POST") {
			let body = "";
			req.on("data", chunk => {
				body += chunk;
			});
			req.on("data", () => {
				req.body = {};
				body.split("&").forEach(item=>{
					const [key,value] = item.split("=");
					req.body[key] = value;
				})
				next();
			})
		} else next();
	}
};
